package behavioral.iterator.self;

public class ConcreteIterator<E> implements Iterator<E> {
	private int mIndex;
	private E[] mElements;

	public ConcreteIterator(E[] e) {
		mIndex = 0;
		mElements = e;
	}

	@Override
	public boolean hasNext() {
		return mIndex < mElements.length;
	}

	@Override
	public E next() {
		return mElements[mIndex++];
	}

}
